home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr49 / 114_01.zip / ED6.CCC < prev    next >
Text File  |  1993-06-01  |  2KB  |  129 lines

  1.  
  2. /*
  3. Screen editor:  terminal output module
  4. Source:  ed6.ccc
  5. This file was created by the configuration program:
  6. Version 2:  September 6, 1981.
  7. */
  8.  
  9. #include ed.h
  10. #include bdscio.h
  11. #include ed1.ccc
  12. #include edext.cc
  13.  
  14. /*
  15. Define the current coordinates of the cursor.
  16. */
  17.  
  18. /*
  19. Return the current coordinates of the cursor.
  20. */
  21.  
  22. outgetx()
  23. {
  24.     return(outx);
  25. }
  26.  
  27. outgety()
  28. {
  29.     return(outy);
  30. }
  31.  
  32. /*
  33. Output one printable character to the screen.
  34. */
  35.  
  36. outchar(c) char c;
  37. {
  38.     syscout(c);
  39.     outx++;
  40.     return(c);
  41. }
  42.  
  43. /*
  44. Position cursor to position x,y on screen.
  45. 0,0 is the top left corner.
  46. */
  47.  
  48. outxy(x,y) int x,y;
  49. {
  50.     outx=x;
  51.     outy=y;
  52.     syscout(138);
  53.     syscout(y);
  54.     syscout(154);
  55.     syscout(x);
  56. }
  57.  
  58. /*
  59. Erase the entire screen.
  60. Make sure the rightmost column is erased.
  61. */
  62.  
  63. outclr()
  64. {
  65.     syscout(12);
  66.     outxy(0,0);
  67. }
  68.  
  69. /*
  70. Delete the line on which the cursor rests.
  71. Leave the cursor at the left margin.
  72. */
  73.  
  74. outdelln()
  75. {
  76.     outxy(0,outy);
  77.     outdeol();
  78. }
  79.  
  80. /*
  81. Delete to end of line.
  82. Assume the last column is blank.
  83. */
  84.  
  85. outdeol()
  86. {
  87. int k;
  88.     k=outx;
  89.     while (k++<SCRNW1) {
  90.         syscout(' ');
  91.     }
  92.     outxy(outx,outy);
  93. }
  94.  
  95. /*
  96. Return yes if terminal has indicated hardware scroll.
  97. */
  98.  
  99. outhasup()
  100. {
  101.     return(YES);
  102. }
  103.  
  104. outhasdn()
  105. {
  106.     return(NO);
  107. }
  108.  
  109. /*
  110. Scroll the screen up.
  111. Assume the cursor is on the bottom line.
  112. */
  113.  
  114. outsup()
  115. {
  116.     /* auto scroll */
  117.     outxy(0,SCRNL1);
  118.     syscout(10);
  119. }
  120.  
  121. /*
  122. Scroll screen down.
  123. Assume the cursor is on the top line.
  124. */
  125.  
  126. outsdn()
  127. {
  128. }
  129.